package com.surprise.base.bo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 * @author nick
 * 2014-6-10
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Tuple<F,S> {
	private F f;
	private S s;
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Tuple other = (Tuple) obj;
        if (f == null) {
            if (other.f != null) {
                return false;
            }
        } else if (!f.equals(other.f)) {
            return false;
        }
        if (s == null) {
            if (other.s != null) {
                return false;
            }
        } else if (!s.equals(other.s)) {
            return false;
        }
        return true;
    }
    @Override
    public int hashCode() {
        final int prime = 5;
        int result = 1;
        result = prime * result + ((f == null) ? 0 : f.hashCode());
        result = prime * result + ((s == null) ? 0 : s.hashCode());
        return result;
    }
}
